package reliability.types.logical_function;

import reliability.types.NetworkConditionMap;

public class LogicalVariable
    extends LogicalFunctionElement
{
    private Integer key;

    public LogicalVariable(double reliability, Integer key)
    {
        this.key = key;
    }

    public boolean evaluate(NetworkConditionMap networkState)
    {
        return networkState.get(key);
    }

    public String toString()
    {
        return "X" + key;
    }
}
